<?php

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TEST分页</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(function(){
	var page = 23;

	var first = 0;
	var pre = 0;
	var next = 0;
	var last = 0;


	var sum = 0;
	sum = parseInt( Number(page)/10 );
	if(sum == 0){
		sum = 1;
	}else if( Number(page)%10 > 0 ){
		sum = Number(sum)+1; 
	} //总页数

	
	
	alert(sum);
	
	




	$("#plast").click(function(){
		var offset =  (Number(page_sum)-1)*10;
		getlist( offset );
	});
	$("#ppre").click(function(){
		var offset = 0;
		if( Number(page_now)>2 ){
			offset = (Number(page_now)-2)*10;
		}
		getlist( offset );
	});
	$("#pnext").clock(function(){
		var offset = Number(page_now)*10;
		alert( offset );
		getlist( offset );
	});

});
</script>

                        <td id="page">
                        	<a id="first" href="#">首页</a>&nbsp;&nbsp;&nbsp; 
                        	<a id="pre" href="#">上页</a>&nbsp;&nbsp;&nbsp; 
                        	<a id="next" href="#">下页</a>&nbsp;&nbsp; &nbsp;
                        	<a id="last" href="#">尾页</a>&nbsp;&nbsp;&nbsp; <span id="pagenum">1/5</span> 
                        </td>


</head>
<body>
</body></html>






